﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public class Person
{
    public string Name { get; set; }

    public Person(string name)
    {
        Name = name;
    }

    public override string ToString() => $"Person: {Name}";
}

public class ReflectionExample
{
    public static void Main(string[] args)
    {
        var personType = typeof(Person);
        var constructor = personType.GetConstructor(new[] { typeof(string) });
        var person = (Person)constructor.Invoke(new object[] { "Tom" });

        Console.WriteLine(person);
    }
}
